<?php
namespace Home\Model;
use Think\Model;
class OrderdetailModel extends Model{
	public function getlist($userId,$goodId){
		 $cart = C('DB_PREFIX').'cart';
		 $goods = C('DB_PREFIX').'goods';
		 $order = C('DB_PREFIX').'order';
		 $sql = "select c.goods_GoodId,c.goods_Color,c.goods_Version,c.Count,c.Buy,g.GoodName from $cart c join $goods g on g.GoodId=c.goods_GoodId where c.user_UserId=$userId and c.Buy='1' and g.GoodId=$goodId	";
		 $data = $this->query($sql);
		 return $data;
	}
}
?>